<?php
/**
*
* 功能描述（交易数据）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*/

class ModelTrade extends ModelBase
{
	function GetList(&$search, &$pageinfo, $fild)
	{
		$where = get_where($this, $search);
		$data  = $this->db->getRow("trade_online", 'count(1) cnt', $where);
		if($data['cnt'] == 0)
		{
			$this->DealPage($pageinfo, 0);
			return array();
		}
		$fild = '`id`, `status`, `createtime`, `lasttime`, `trade_type`, `type`, `amount`, `data_id`, `user_id`, `ret_status`, `order_id`, `info`';
		$limit = $this->DealPage($pageinfo, $data['cnt']);
		$data = $this->db->GetAll('trade_online', $fild, $where, '', $limit);
		return $data;
	}
}

